package com.dalianpai.gulimall.gulimallauthserver.feign;

import com.dalianpai.common.to.SocialUser;
import com.dalianpai.common.utils.R;
import com.dalianpai.gulimall.gulimallauthserver.vo.UserLoginVo;
import com.dalianpai.gulimall.gulimallauthserver.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author WGR
 * @create 2020/7/15 -- 21:16
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

    @PostMapping("/member/member/regist")
     R regist(@RequestBody UserRegistVo vo);

    @PostMapping ("/member/member/login")
     R login(@RequestBody UserLoginVo vo);

    @PostMapping ("/member/member/oauth2/login")
     R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;
}
